
Public Class AsignaturasGrid



    Private Sub mnuAgregar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnuAgregar.Click
        'asignaturas_list = New AsignaturasCollection()


        AsignaturaForm.Modificacion = "Alta"

        AsignaturaForm.Show()
    End Sub



    Private Sub LlenarForm2()
        AsignaturaForm.TextBox1.Text = DataGridView1.CurrentRow.Cells(0).Value.ToString
        Asignaturaform.TextBox2.Text = DataGridView1.CurrentRow.Cells(1).Value.ToString
        Asignaturaform.TextBox3.Text = DataGridView1.CurrentRow.Cells(2).Value.ToString
        AsignaturaForm.TextBox4.Text = DataGridView1.CurrentRow.Cells(3).Value.ToString
        AsignaturaForm.ComboBox1.SelectedItem = DataGridView1.CurrentRow.Cells(4).Value - 1

    End Sub



    Private Sub mnuEditar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuEditar.Click
        AsignaturaForm.Modificacion = "Editar"
        AsignaturaForm.indiceAsignaturas = DataGridView1.CurrentRow.Index


        LlenarForm2()

        AsignaturaForm.Show()
    End Sub


    Private Sub mnuSalir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuSalir.Click
        Me.Close()
    End Sub

    Private Sub AsignaturasGrid_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        DataGridView1.DataSource = asignaturas_list
    End Sub

    Private Sub mnuEliminar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuEliminar.Click
        AsignaturaForm.Modificacion = "Elimina"
        AsignaturaForm.indiceAsignaturas = DataGridView1.CurrentRow.Index

        LlenarForm2()

        AsignaturaForm.Show()
    End Sub

    Private Sub mnuActualizar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuActualizar.Click

    End Sub
End Class


